package(default_visibility = ["//visibility:public"])

sh_binary(
    name = "mkpj",
    srcs = ["mkpj_binary"],
    args = [
        "--config-path=$(location //config/prow:config.yaml)",
        "--job-config-path=config/jobs",
    ],
    data = [
        ":prowjobs",
        "//config/prow:config.yaml",
    ],
)

alias(
    name = "mkpj_binary",
    actual = "//prow/cmd/mkpj:mkpj",
)

filegroup(
    name = "prowjobs",
    srcs = glob([
        "jobs/**/*.yaml",
    ]),
)

filegroup(
    name = "testgrids",
    srcs = glob([
        "testgrids/**/*.yaml",
    ]),
)

filegroup(
    name = "testgrid_default",
    srcs = ["testgrids/default.yaml"],
)

filegroup(
    name = "package-srcs",
    srcs = glob(["**"]),
    tags = ["automanaged"],
    visibility = ["//visibility:private"],
)

filegroup(
    name = "all-srcs",
    srcs = [
        ":package-srcs",
        "//config/prow:all-srcs",
        "//config/prow-staging:all-srcs",
        "//config/tests/jobs:all-srcs",
        "//config/tests/lint:all-srcs",
        "//config/tests/testgrids:all-srcs",
    ],
    tags = ["automanaged"],
)
